home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / inventor / models / ellipsoidManip.iv < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.9 KB  |  70 lines

  1. #Inventor V2.0 ascii
  2. # Self Manipulating ellipsoid
  3. Separator {
  4.     Rotation {
  5.        rotation 1 0 0 -1.5708
  6.     }
  7.     # Interface for ellipsoid control
  8.     Separator {
  9.         BaseColor { rgb 1 0 0 }
  10.         DEF AXIS_X_DRAGGER Translate1Dragger {
  11.             translation 1 0 0
  12.             translator DEF DRAG_BALL Separator {
  13.                 Cube { width .2 height .2 depth .2 }
  14.             }
  15.             translatorActive DEF DRAG_YELLOW_BALL Separator {
  16.                 BaseColor { rgb 1 1 0 }
  17.                 Cube { width .2 height .2 depth .2 }
  18.             }
  19.         }
  20.     }
  21.     Separator {
  22.         BaseColor { rgb 0 0 1 }
  23.         Rotation {
  24.            rotation 0 0 1  -1.5708
  25.         }
  26.         DEF AXIS_Y_DRAGGER Translate1Dragger {
  27.             translation 1 0 0
  28.             translator USE DRAG_BALL
  29.             translatorActive USE DRAG_YELLOW_BALL
  30.         }
  31.     }
  32.     Separator {
  33.         BaseColor { rgb 0 1 0 }
  34.         Rotation {
  35.            rotation 0 1 0  -1.5708
  36.         }
  37.         DEF AXIS_Z_DRAGGER Translate1Dragger {
  38.             translation 1 0 0
  39.             translator USE DRAG_BALL
  40.             translatorActive USE DRAG_YELLOW_BALL
  41.         }
  42.     }
  43.     Separator {
  44.         BaseColor { rgb .8 .8 .8 }
  45.         Scale {
  46.              scaleFactor 1 1 1 = ComposeVec3f {
  47.                  x = Calculator {
  48.                      A = USE AXIS_X_DRAGGER . translation
  49.                      expression [ "oa = 1.0*A[0]" ]
  50.                      }
  51.                      .oa
  52.                  y = Calculator {
  53.                      A = USE AXIS_Y_DRAGGER . translation
  54.                      expression [ "oa = 1.0*A[0]" ]
  55.                      }
  56.                      .oa
  57.                  z = Calculator {
  58.                      A = USE AXIS_Z_DRAGGER . translation
  59.                      expression [ "oa = 1.0*A[0]" ]
  60.                      }
  61.                      .oa
  62.              }
  63.              . vector
  64.         }
  65.         Sphere {
  66.         }
  67.     }
  68. }
  69.  
  70.